<template>
  <div class="md:flex" style="flex-wrap: wrap;">

    <img :src="homeimg"/>
  </div>
</template>
<script lang="ts" setup>
  import { onMounted, reactive, ref } from 'vue';
  import dayjs from 'dayjs';
  // import { CountTo } from '/@/components/CountTo/index';
  import { Icon } from '/@/components/Icon';
  import { Tag, Card } from 'ant-design-vue';
  import { growCardList } from '../data';
  import { rDtaBoardModule, oDtaBoardModule, cDtaBoardModule, YDataBoardModule } from '../api';
  import homeimg from '/@/assets/loginmini/icon/home.png';
  const today = new Date();
  const year = ref('')

  // const cardList = reactive({
  //   data: []
  // })

  const cardList = ref([])


  defineProps({
    loading: {
      type: Boolean,
    },
  });

  let old
  async function zDataFun () {
/*    let data = growCardList
    let r = await rDtaBoardModule()
    let o = await oDtaBoardModule()
    let c = await cDtaBoardModule()
    let y = await YDataBoardModule({year: year.value ? dayjs(year.value).year() : today.getFullYear()})
    console.log('y----------', y)
    data[0] = Object.assign(data[0], r.result)
    data[1] = Object.assign(data[1], o.result)
    data[2] = c.result? Object.assign(data[2], {currentMonthAmount:c.result.currentMonthAmount,chistoryAmount:c.result.historyAmount,chistoryProfit:c.result.historyProfit,isAdmin:c.result.isAdmin}) : data[2]
    data[3] = y.result ? Object.assign(data[3], y.result) : Object.assign(data[3], {totalProfit: 0, totalContractAmount: 0})
    old = data
    cardList.value = []
    cardList.value = Object.assign(data)
    console.log(JSON.stringify(cardList.value))*/
  }

  async function changeDate (e) {
    zDataFun()
  }

  onMounted(() => {
    zDataFun()
  })
</script>

<style>
.p-4 .ant-card-head-title{
  font-size: 16px;
}
</style>
